package com.adjy.pathbuilders.commons;

/**
 * This exception is thrown when a method which creates an object
 * from a given source receives an invalid source. Invalid in this case
 * may mean that the source is corrupted, contains invalid data or some 
 * data is missing.
 */
public class InvalidSourceException extends Exception {

	private static final long serialVersionUID = 3386830249428897265L;
	private String source;
	
	public InvalidSourceException() {
	}

	public InvalidSourceException(String source) {
		this.source = source;
	}	
	
	public InvalidSourceException(String detailMessage, Throwable throwable, String source) {
		super(detailMessage, throwable);
		this.source = source;
	}

	public InvalidSourceException(String detailMessage, String source) {
		super(detailMessage);
		this.source = source;
	}

	public InvalidSourceException(Throwable throwable, String source) {
		super(throwable);
		this.source = source;
	}

	public String getSource() {
		return source;
	}
}
